package com.atguigu.tingshu.album.service;

import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.AlbumTrackListVo;
import com.atguigu.tingshu.vo.album.TrackInfoVo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

public interface TrackInfoService extends IService<TrackInfo> {

    /*
    * 获取声音列表
    * */
    IPage<TrackListVo> getTrackList(Page<TrackListVo> trackListVoPage, TrackInfoQuery trackInfoQuery);

    /*
    * 上传声音
    * */
    Map<String, Object> uploadTrack(MultipartFile file);

    /*
    * 保存声音
    * */
    void saveTrackInfo(TrackInfoVo trackInfoVo, Long userId);

    /*
    * 删除声音
    * */
    void deleteTrackInfoById(Long trackId);

    /*
    *   修改声音
    * */
    void updateTrackInfo(Long trackId, TrackInfoVo trackInfoVo);

    /*
    * 根据专辑id获取声音分页列表
    * */
    IPage<AlbumTrackListVo> getTrackPageList(Page<AlbumTrackListVo> trackListVoPage, Long albumId, Long userId);
}
